package com.zhl.media.app.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.zhl.media.app.mvp.contract.MediaContract;
import com.zhl.media.app.mvp.model.MediaModel;


@Module
public class MediaModule {
    private MediaContract.View view;

    /**
     * 构建MediaModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public MediaModule(MediaContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    MediaContract.View provideMediaView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    MediaContract.Model provideMediaModel(MediaModel model) {
        return model;
    }
}